Airchains (Validator)
System Requirements (Minimum-Recommended)
Ram | cpu | disk |
---|---|---|
2-4 GB | 2-4 Core | 50-200 GB SSD |
Install Dependecies :
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential
sudo apt -qy upgrade
ver="1.21.3" &&
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" &&
sudo rm -rf /usr/local/go &&
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" &&
rm "go$ver.linux-amd64.tar.gz" &&
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile &&
source $HOME/.bash_profile &&
go version
mkdir -p $HOME/go/bin
Install Airchains Binary :
cd $HOME
wget -O junctiond https://github.com/airchains-network/junction/releases/download/v0.1.0/junctiond
chmod +x junctiond
mv junctiond $HOME/go/bin/
Node Configuration (Replace your name in the first line with IntoBlock) :
junctiond init IntoBlock --chain-id junction && \
junctiond config set client chain-id junction && \
junctiond config set client keyring-backend test
Download Genesis & Addressbook :
curl https://config-t.noders.services/airchains/genesis.json -o ~/.junction/config/genesis.json
curl https://config-t.noders.services/airchains/addrbook.json -o ~/.junction/config/addrbook.json
Configure Port :
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"7ebc08bbef4bd2b4da8d881474710a2500854c2b@airchain-t-rpc.noders.services:31656\"/" ~/.junction/config/config.toml
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.001uamf\"|" ~/.junction/config/app.toml
sed -i \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
~/.junction/config/app.toml
echo "export junctiond_PORT="26657"" >> $HOME/.bash_profile
# Set custom ports in app.toml
sed -i.bak -e "s%:1317%:${junctiond_PORT}317%g" \
-e "s%:8080%:${junctiond_PORT}080%g" \
-e "s%:9090%:${junctiond_PORT}090%g" \
-e "s%:9091%:${junctiond_PORT}091%g" \
-e "s%:8545%:${junctiond_PORT}545%g" \
-e "s%:8546%:${junctiond_PORT}546%g" \
-e "s%:6065%:${junctiond_PORT}065%g" ~/.junction/config/app.toml
# Set custom ports in config.toml file
sed -i.bak -e "s%:26658%:${junctiond_PORT}658%g" \
-e "s%:26657%:${junctiond_PORT}657%g" \
-e "s%:6060%:${junctiond_PORT}060%g" \
-e "s%:26656%:${junctiond_PORT}656%g" \
-e "s%:26660%:${junctiond_PORT}660%g" ~/.junction/config/config.toml
Create Junctiond Service :
sudo tee /etc/systemd/system/junctiond.service > /dev/null << EOF
[Unit]
Description=airchains node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which junctiond) start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable junction
sudo systemctl enable junctiond
Start Junctiond and see the logs :
sudo systemctl start junctiond && sudo journalctl -u junctiond -f --no-hostname -o cat
You can stop seeing the logs with CTRL+C !
If your node is not syncing , try these commands to change the peers configuration and check which one is working correctly .
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"7ebc08bbef4bd2b4da8d881474710a2500854c2b@airchain-t-rpc.noders.services:31656\"/" ~/.junction/config/config.toml
sudo systemctl restart junctiond && sudo journalctl -u junctiond -f --no-hostname -o cat
PEERS="[email protected]:63656,[email protected]:36656,[email protected]:26656,[email protected]:13356,[email protected]:10156,[email protected]:22656,[email protected]:63656,[email protected]:13756,[email protected]:19656,9ba635344d9c64a4b1d82d7e1138d0216afc27c4@rpc.airchains.aknodes.net:34656,[email protected]:19656,47f61921b54a652ca5241e2a7fc4ed8663091e89@airchains-testnet-rpc.itrocket.net:19656,[email protected]:24656"
sed -i 's|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.junction/config/config.toml
sudo systemctl restart junctiond && sudo journalctl -u junctiond -f --no-hostname -o cat
PEERS="47f61921b54a652ca5241e2a7fc4ed8663091e89@airchains-testnet-peer.itrocket.net:19656,[email protected]:43456,[email protected]:28156,[email protected]:656,[email protected]:60556,d5ded9ed366f251a59c85f84ed1fa825cceb0d97@[2a01:4f8:221:158e::2]:13656,[email protected]:22656,[email protected]:13056,[email protected]:43456,[email protected]:26656,aaf57c42eb1a53b487443088db025a5d05f78159@[2a01:4f9:3051:19c2::2]:13756"
sed -i 's|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.junction/config/config.toml
sudo systemctl restart junctiond && sudo journalctl -u junctiond -f --no-hostname -o cat
Check out the logs :
sudo journalctl -u junctiond -f --no-hostname -o cat
Before continuing the process you have to wait about 48hr for your node to be synced then continue the process!
Run the Command to check the status of the Node.
junctiond status
Should the 'catching_up' field return 'true', it's important to wait until the Node completes its synchronization. Do not proceed with further steps until this process is finished.
Creating New Account for the Validator
junctiond keys add <validator-name>
Fund you Account
You need to ensure that your validator account holds a minimum of 58 tokens . If your account doesn't have enough tokens, you can acquire testnet tokens from our discord faucet channel. The faucet is accessible at Airchains Faucet.
Stake Token to become a Validator
Before executing the command junctiond tx staking create-validator path/to/validator.json --from keyname
, you need to create a validator.json
file with the following details. Below is an example:
To obtain the pubkey, you can use the command:
junctiond comet show-validator
The output will be something like this:
{"@type":"/cosmos.crypto.ed25519.PubKey","key":"ZXONS7NNjLWH4HePBOoHKDAYeLXQO5iUwpCRQSi1poI="}
You'll need to paste the pubkey value into the pubkey section of the JSON file.
Please adjust the staking amount and other keys as you see fit.
{
"pubkey": <validator-pub-key>,
"amount": "1000000amf",
"moniker": "<validator-name>",
"identity": "optional identity signature (ex. UPort or Keybase)",
"website": "validator's (optional) website",
"security": "validator's (optional) security contact email",
"details": "validator's (optional) details",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
junctiond tx staking create-validator path/to/validator.json --from <key-name> --chain-id junction --fees 500amf
A prompt will appear in the CLI. To proceed, type 'y' and press enter.
It will return Transaction hash Like this
code: 0
codespace: ""
data: ""
events: []
gas_used: "0"
gas_wanted: "0"
height: "0"
info: ""
logs: []
raw_log: '[]'
timestamp: ""
tx: null
txhash: 3068ED7C9867D9DC926A200363704715AE9470EE73452324A32C2583E62B1D79
Query Validator Set
To See if you were accepted as a validator,
junctiond query tendermint-validator-set
If your address is visible, it indicates successful inclusion in the validator set. Please note that this process may take some time.